<div id="main">
	<div id="fresh-list" class="content-block">
		<h2>最新书籍</h2>
		<ul class="book-pic-list">
			<?php
			$index = 0; 
			foreach( $new_books as $book):?>
			<li class="<?php echo $index++%5==0?'first':''; ?>">
			<div class="book-pic-pair">
				<?php echo $this->Html->link($this->Html->image($this->Image->thumbnail($book['Book']['id'],$book["Book"]["path"]."/cover.jpg",'160*224',100,0),array('alt'=>$book["Book"]["title"])),'/books/view/'.$book['Book']['id'],array('escape'=>false)); ?>
				<h3><?php echo $this->Html->link($book["Book"]["title"],'/books/view/'.$book['Book']['id']);?>
				</h3>
			</div>
			<p><?php echo $this->Time->format('Y-m-d',$book["Book"]["timestamp"])?>更新</p>
			</li>
			<?php endforeach;?>
		</ul>
	</div>
	<div id="fresh-list" class="content-block">
		<h2>刚刚被下载的书籍</h2>
		<ul class="book-pic-list">
			<?php
			$index = 0; 
			foreach( $new_downloads as $book):?>
			<li class="<?php echo $index++%5==0?'first':''; ?>">
			<p>
			<a href="http://weibo.com/<?php echo $book['User']['remoteid']; ?>" target="_blank">
			<?php echo $book['User']['name'] ?></a>刚刚下载了</p>
			<div class="book-pic-pair">
				<?php echo $this->Html->link($this->Html->image($this->Image->thumbnail($book['Download']['book'],$book['Book']["Book"]["path"]."/cover.jpg",'160*224',100,0),array('alt'=>$book['Book']["Book"]["title"])),'/books/view/'.$book['Download']['book'],array('escape'=>false)); ?>
				<h3><?php echo $this->Html->link($book['Book']["Book"]["title"],'/books/view/'.$book['Download']['book']);?>
				</h3>
			</div>
			</li>
			<?php endforeach;?>
		</ul>
	</div>
	<div id="fresh-note-list" class="content-block">
		<h2>最新读书笔记</h2>
		<ul class="rich-note-list">
			<?php
			$index = 0; 
			foreach( $notes as $note):?>
			<li class="<?php echo $index++%5==0?'first':''; ?>">
			<div class="book-pic-pair">
				<?php echo $this->Html->link($this->Html->image($this->Image->thumbnail($note['Note']['book'],$note['Book']["Book"]["path"]."/cover.jpg",'160*224',100,0),array('alt'=>$note['Book']["Book"]["title"])),'/books/view/'.$note['Note']['id'],array('escape'=>false)); ?>			</div>
			<h3><?php echo $this->Html->link($note['Book']["Book"]["title"],'/books/view/'.$note['Note']['book']);?></h3>
			<div class="note">
				<p><a class="author-name" href="http://weibo.com/<?php echo $note['user']['remoteid']; ?>"><?php echo $note['user']['name'] ?></a>:<?php echo $note['Note']['content'];?>
				@ <span><?php echo $this->Time->format('Y-m-d',$note["Note"]["timestamp"])?></span></p>
				<a class="user-avatar" href="http://weibo.com/<?php echo $note['user']['remoteid']; ?>">
				<?php echo $this->Html->image($note['user']['avatar_url'],array('alt'=>$note['user']['name'],'class'=>'user-avatar')); ?></a>
			</div>
			</li>
			<?php endforeach;?>
		</ul>
	</div>
</div>
<div id="side">
</div>
